home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / yet101.zip / YET10.DOC < prev   
Text File  |  1992-03-19  |  3KB  |  77 lines

  1.                                   YET 1.0
  2.                               Is it time YET?
  3.  
  4. This utility was designed for use in batch files to determine if a
  5. specified time or date has been reached.  This could be useful in
  6. recommending backups, or file cleanups.  Other uses are left to your
  7. imagination.  YET communicates with your batch file through the command
  8. line and the exit code.  The exit code can be used to branch in your batch
  9. file.  
  10.  
  11. Parameters:
  12. Date:     A date on or after which YET will return "True" (exit code 0). 
  13.      If a time is specified, it must be after that time also.  Format is
  14.      MM/DD/YYYY, in numbers or MONTH/DD/YYYY or DD/MONTH/YYYY using 3 or
  15.      more letters in the month name.  Years may be abbreviated to 2
  16.      numbers, or omitted for current year.  Some format checking to ensure
  17.      that months greater than 12, or days greater than 31 is performed to
  18.      aid the user.
  19. Day:      An alternative to specifying the date, is specifying the day of
  20.      the week.  At least 3 letters must be used.  YET will return "True"
  21.      (exit code 0) only ON that day.  There is no "after" a day of the
  22.      week.  If a time is specified it must be after that time also.
  23. Time:     Time of Day in 24 hour notation, HH:MM:SS.  Only Hours are
  24.      mandatory, but they must be followed by a colon.
  25. PAUSE:    A "switch."  If pause is specified on the command line, the
  26.      program will wait 5 seconds before continuing in your batch file, so
  27.      that you may read its output.  Do not put slashes or dashes in front
  28.      of these switches!
  29. QUIET:    Another "switch."  Once you are assured that your batch file
  30.      correctly branches with YET, all non-error text output of YET is
  31.      suppressed.  Each switch may be abbreviated to a single letter.  
  32.  
  33. Errors:
  34. If YET does not understand one of the command line parameters, it will
  35. declare the error, display a help screen and pause for 5 seconds.  It will
  36. then return an exit code of 1.
  37.  
  38. Exit Codes:
  39. In a batch file, the exit code may be tested after a program is run.  The
  40. ERRORLEVEL construct of the IF command is used to branch on the exit code
  41. results.  When testing ERRORLEVELs you must work from highest to lowest,
  42. since the IF condition is true if the exit code is higher or equal to the
  43. ERRORLEVEL specified.  
  44.  
  45. Example Batch File:
  46. ECHO OFF
  47. YET 12/25 Pause
  48. IF ERRORLEVEL 2 GOTO NOTYET
  49. IF ERRORLEVEL 1 GOTO ERROR
  50. REM Pass-through Exit code was 0
  51. ECHO MERRY CHRISTMAS!
  52. GOTO END
  53. :NOTYET
  54. ECHO Still Waiting for Christmas . . . 
  55. GOTO END
  56. :ERROR
  57. ECHO YET did not understand the command line
  58. PAUSE
  59. :END
  60.  
  61. Generation and support of YET is made possible by user registration.  If
  62. you find that YET is valuable to you, register it by filling out the below
  63. form and sending $5.00 to: 
  64.  
  65.      Computer Widow Software
  66.      P.O. Box 143
  67.      Cedar Brook NJ 08018
  68.  
  69. Name      _________________________________  
  70. Address   _________________________________
  71.  
  72. Type of Computer    /_/ 8088/8086  /_/ 286   /_/ 386   /_/486
  73.                     /_/ Other ____________________
  74. DOS Version _________
  75.  
  76. Product YET 1.0
  77.